require "luasql.mysql"


env = assert(luasql.mysql())

con = assert(env:connect("myexam090223","test","test","192.168.51.94"))

cursor = con:execute("desc cq_action")



s=cursor:fetch()
local insert=''
while (s ~= nil) do
	if(insert ~='') then
		insert=insert..','..s
	else
		insert ='('.. s
	end
		s = cursor:fetch()
end
print (insert..')')

con:close()

print (cursor:fetch())
function rows (connection,sql_statement)
	local cursor = assert (connection:execute(sql_statement))

	return function()
		return cursor:fetch()
	end
end


